<template>
  <el-cascader
    v-model="value"
    :options="cascadeData"
    :props="{ emitPath: true,checkStrictly: true }"
    :show-all-levels="true"
    style="width: 100%"
    clearable
    @change="changeValue"
  />
</template>
<script>
import request from '@/utils/request'
export default {
  data() {
    return {
      value: [],
      cascadeData: []
    }
  },
  created(){
      this.getCascade()
  },
  methods: {
    changeValue(e) {
      this.$emit("setGroupCode",this.value)
    },
    // setSelectValue(value) {
    //   this.value = value
    // },
    getCascade(){
      request({
        url: '/arpa-basic-api/staffs/cascadeData',
        method: 'get'
      }).then(response => {
        this.cascadeData = response.data
      })
      if(this.setEditValue){
        this.setEdit()
      }
    },
  }
}
</script>
